home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
UTILITY
/
DO1002.ARJ
/
TIMER.SCR
< prev
next >
Wrap
Text File
|
1991-12-05
|
1KB
|
44 lines
*┌─────────────────────────────────────────────────────────┐
*│ SCRIPT: Timer -- shows use of /CLOCK and /LOOK commands │
*└─────────────────────────────────────────────────────────┘
/CLOCK ON
.clr
TIMER:
╔══════════════════════════════════════════════════════════════╗
║ This script will record the amount of time you spend in ║
║ interactive mode. Press »bo«<ENTER>»#« to go into interactive ║
║ mode. Be sure to use the »ye«/EXIT»#« command to leave interactive ║
║ mode. ║
╚══════════════════════════════════════════════════════════════╝
/PAGEPROMPT "Press <enter> to go into interactive mode . . ."
.pg
* Check the default clock position for the value
/LOOK 1 70 8
* Store the value in the variable TimeOn
/SET TimeOn %Found
Session Start: %TimeOn
* Go into interactive mode
/RETRIEVE OFF
/INTERACTIVE
/PAGEPROMPT
* After leaving interactive mode, check the time
/LOOK 1 70 8
* Store the value in TimeOff and display the result.
/SET TimeOff %Found
/CLOCK OFF
/MATH SS (@cpy(%TimeOn,1,2)*3600)+(@cpy(%TimeOn,4,2)*60)+@cpy(%TimeOn,7,2)
/MATH OS (@cpy(%TimeOff,1,2)*3600)+(@cpy(%TimeOff,4,2)*60)+@cpy(%TimeOff,7,2)
/MATH Time %OS-%SS
.clr
»bo« INTERACTIVE SESSION TIMING »#«
Session Start : %TimeOn
Session End : %TimeOff
Seconds : %Time(########)
/PAGE -24
/ENDEXEC CLEAR